package Text2;

/*
 *@Student 张策
 */
public class No2 {
    public static void main(String[] args) {
        tiger tiger = new tiger();
        MyThread myThread = new MyThread(tiger);
        myThread.start();
    }
}
class Animal{}
class tiger extends Animal implements Runnable{
    @Override
    public void run() {
        System.out.println("老虎");
    }
}
class MyThread implements Runnable{
    private Runnable target=null;
    @Override
    public void run() {
        if(target!=null){
            target.run();
        }
    }
    public MyThread(Runnable target){
        this.target=target;
    }
    public void start(){
        start0();
    }
    public void start0(){
        run();
    }
}
